An electronic document refers to a file in an electronic medium that includes text portions. Some examples of electronic documents may include, but are not limited to, emails, news articles, journals, web pages, or any electronic document containing text. In certain scenarios, the electronic document may include text that may not provide much semantic information compared to the semantic information in the main content of the electronic document. For example, emails may include digital signatures, disclaimer notices, disclosures, headers/footers, or pre-defined text in templates that are semantically irrelevant. At times, it may be desirable to remove such irrelevant portions from the electronic document to enhance its readability.